<nz-card>
  <div class="filter-box">
    <button nz-button (click)="st.reload()"><i nz-icon nzType="reload" theme="outline"></i>刷新</button>
    <button nz-button (click)="create()" acl="Root.Admin.Identity.User.Create">
      <i nz-icon nzType="plus-circle" theme="outline"></i>新增
    </button>

    <itcore-ad-search [request]="request" [columns]="columns" (submited)="search($event)"></itcore-ad-search>
  </div>
  <st
    #st
    [data]="readUrl"
    [columns]="columns"
    [req]="req"
    [res]="res"
    [(pi)]="request.PageCondition.PageIndex"
    [(ps)]="request.PageCondition.PageSize"
    [page]="page"
    size="small"
    multiSort
    (change)="change($event)"
    (error)="error($event)"
  >
  </st>
</nz-card>
<!--新增、编辑-->
<nz-modal #modal [nzVisible]="false" [nzTitle]="editTitle" [nzClosable]="false" [nzFooter]="null">
  <sf #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="editRow" button="none">
    <div class="modal-footer">
      <button nz-button type="button" (click)="close()">关闭</button>
      <button nz-button type="submit" [nzType]="'primary'" (click)="save(sf.value)" [disabled]="!sf.valid" [nzLoading]="http.loading">
        保存
      </button>
    </div>
  </sf>
</nz-modal>
<!--修改角色-->
<app-itcore-modal-tree
  #roleModal
  [title]="roleTitle"
  [treeDataUrl]="roleTreeDataUrl"
  [submitACL]="'Root.Admin.Identity.User.SetRoles'"
  (submited)="setRoles($event)"
></app-itcore-modal-tree>
<!--修改权限-->
<app-itcore-modal-tree
  #moduleModal
  [title]="moduleTitle"
  [treeDataUrl]="moduleTreeDataUrl"
  [submitACL]="'Root.Admin.Identity.User.SetModules'"
  (submited)="setModules($event)"
></app-itcore-modal-tree>
<!--查看功能-->
<nz-drawer [nzTitle]="functionTitle" [nzVisible]="functionVisible" nzWidth="600px" (nzOnClose)="closeFunction()">
  <itcore-function-view #function [ReadUrl]="functionReadUrl"></itcore-function-view>
</nz-drawer>
<!-- 重置密码 -->
<nz-modal [(nzVisible)]="isVisibleResetModal" nzTitle="重置密码" (nzOnCancel)="handleCancelResetModal()" (nzOnOk)="resetPasswordConfirm()">
  <form nz-form [formGroup]="validateResetForm" class="login-form">
    <nz-form-item>
      <nz-form-control nzErrorTip="新密码不能为空！">
        <nz-input-group nzPrefixIcon="user">
          <input type="password" nz-input formControlName="NewPassword" placeholder="请输入新密码" />
        </nz-input-group>
      </nz-form-control>
    </nz-form-item>
    <nz-form-item>
      <nz-form-control nzErrorTip="确认密码不能为空！">
        <nz-input-group nzPrefixIcon="lock">
          <input type="password" nz-input formControlName="ConfirmPassword" placeholder="请输入确认密码" />
        </nz-input-group>
      </nz-form-control>
    </nz-form-item>
  </form>
</nz-modal>
